package info.techgeek.labs.clone;

public class CloneExample {
	
	public static void main(String arg[]) {
		Employee jwz = new Employee();
		jwz.setName("Jamie Zawinski");
		
		try {
			
			Employee joel = (Employee) jwz.clone();
			joel.setDesignation("Architect");
			System.out.println(joel.getName()+" "+joel.getDesignation());
			System.out.println(jwz.getName()+" "+jwz.getDesignation());
			
		} catch (CloneNotSupportedException cnse) {
			System.out.println("Cloneable should be implemented. " + cnse);
		}
//	Employee joel = jwz;
//	joel.setDesignation("Architect");
//	System.out.println(joel.getName()+" "+joel.getDesignation());
//	System.out.println(jwz.getName()+" "+jwz.getDesignation());
	}
}